package br.com.beiramar.entity.imovel.tipoImovel;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

@Entity
@Table(name = "TipoImovel", schema = "ev")
@NamedQueries({ @NamedQuery(name = "tipoImovel.Dados", query = "Select Object(result) from TipoImovel result") })
public class TipoImovel implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name = "idTipoImovel", unique = true, nullable = false)
	private Integer idTipoImovel;

	@Column(name = "tipoImovel")
	private String tipoImovel;

	public Integer getIdTipoImovel() {
		return idTipoImovel;
	}

	public void setIdTipoImovel(Integer idTipoImovel) {
		this.idTipoImovel = idTipoImovel;
	}

	public String getTipoImovel() {
		return tipoImovel;
	}

	public void setTipoImovel(String tipoImovel) {
		this.tipoImovel = tipoImovel;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((idTipoImovel == null) ? 0 : idTipoImovel.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		TipoImovel other = (TipoImovel) obj;
		if (idTipoImovel == null) {
			if (other.idTipoImovel != null)
				return false;
		} else if (!idTipoImovel.equals(other.idTipoImovel))
			return false;
		return true;
	}

}
